import { post } from '../../http'
import store from '@/store'

/**
 * 获取供应商列表数据
 */

export const checkSysfleetList = ({ fltName, isViewService, fltType = 'GYS', fltPorts, uuid, fltAuditstatus, PageIndex, PageSize }) =>
  post('/FTKJWLHYPT/system/querySysFleet', {
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          fltName,
          isViewService,
          fltType,
          fltPorts,
          uuid,
          fltAuditstatus
        }
      },
      Orderby: {},
      PageIndex: {
        FTKJWLHYPT: PageIndex
      },
      PageSize: {
        FTKJWLHYPT: PageSize
      }
    }
  })
/**
 * 获取供应商列表数据
 */

export const editSysFleet = ({ companyData }) =>
  post('/FTKJWLHYPT/system/editSysFleet', {
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          uuid: companyData.uuid,
          fltName: companyData.fltName,
          fltAddress: companyData.fltAddress,
          fltLinkphone: companyData.fltLinkphone,
          fltCode: companyData.fltCode,
          fltContact: companyData.fltContact,
          fltContactPhone: companyData.fltContactPhone,
          cltCliLegalname: companyData.cltCliLegalname,
          cltCliLegalid: companyData.cltCliLegalid,
          cltRegistorno: companyData.cltRegistorno,
          fltBank: companyData.fltBank,
          fltAccount: companyData.fltAccount,
          businessLicense: companyData.businessLicense,
          idCardFront: companyData.idCardFront,
          idCardBack: companyData.idCardBack,
          lastModifier: store.state.user.USR_CODE_DX_H,
          fltBankCode: companyData.fltBankCode,
          fltBranchCode: companyData.fltBranchCode,
          fltBranchName: companyData.fltBranchName,
          fltPrvCode: companyData.fltPrvCode,
          fltCtiye: companyData.fltCtiye,
          fltCtyCode: companyData.fltCtyCode
        }
      }
    }
  })
/**
 * 获取供应商列表数据
 */

export const delSysFleet = ({ uuid }) =>
  post('/FTKJWLHYPT/system/delSysFleet', {
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          uuid,
          lastModifier: store.state.user.USR_CODE_DX_H
        }
      }
    }
  })

/**
 * 金融汇总列表数据
 */
export const financialList = ({ PageIndex, PageSize, fltId, contractNo, fsStatus }) =>
  post('/FTKJWLHYPT/statistics/financial', {
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          fltId,
          contractNo,
          fsStatus
        }
      },
      Orderby: {},
      PageIndex: {
        FTKJWLHYPT: PageIndex
      },
      PageSize: {
        FTKJWLHYPT: PageSize
      }
    }
  })
